package com.ftg.learn.chapter03;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

/**
 * 缓冲的
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/12/5 下午2:28
 */
public class LearnBufferReader {

    public static void main(String[] args) {
        File file = new File("/home/kangjx/Desktop/ruoyi/a.txt");
        try(
            FileReader fileReader = new FileReader(file);
            BufferedReader bufferedReader = new BufferedReader(fileReader);
        ){
           while (bufferedReader.ready()){
               System.out.println(bufferedReader.readLine());
           }

        }catch (IOException e){
            e.printStackTrace();
        }

    }

}
